<?php
/**
 * TbUserMall.php class file.
 * @author wudg <544038230@qq.com>
 * @date 2020/11/4- 10:08 上午
 */

namespace common\models\pdd;


use common\models\base\ActiveRecord;

/**
 * This is the model class for table "tb_user_mall".
 *
 * @property int $id
 * @property int $uid 关联tb_user.id
 * @property int $mall_id 店铺mall_id
 * @property int $merchant_type 订购版本店铺类型,1:个人 2:企业 3:旗舰店 4:专卖店 5:专营店 6:普通店
 * @property string $mall_name 店铺标题
 * @property string $logo 店铺图片地址
 * @property string $mall_desc 店铺简介
 * @property int $end_date 授权到期时间
 * @property int $points 店铺点数
 * @property int $last_use_time 最近登录时间
 * @property int $created_at 录入时间
 * @property int $updated_at 更新时间
 */
class PddUserMall extends ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'pdd_user_mall';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['uid', 'mall_id', 'merchant_type','is_delete', 'end_date', 'last_use_time', 'created_at', 'updated_at', 'points'], 'integer'],
            [['merchant_type', 'mall_name', 'end_date', 'last_use_time', 'updated_at'], 'required'],
            [['mall_name'], 'string', 'max' => 50],
            [['logo', 'mall_desc'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'uid' => '关联tb_user.id',
            'mall_id' => '店铺mall_id',
            'merchant_type' => '订购版本店铺类型',
            'mall_name' => '店铺标题',
            'logo' => '店铺图片地址',
            'mall_desc' => '店铺简介',
            'is_delete' => '是否删除',
            'end_date' => '授权到期时间',
            'points' => '店铺点数',
            'last_use_time' => '最近登录时间',
            'created_at' => '录入时间',
            'updated_at' => '更新时间',
        ];
    }
}